<?php defined('MYLITS') ? '' : exit('No direct script access allowed'); ?>
<?php if (!empty($languages)): ?>
    <ul class="widget-lang">
        <?php foreach ($languages as $language): ?>
        <li>
            <a href="<?=  Mylits_System::getCurrentUrl() . '?lang=' . $language['code']?>">
                <img alt="<?=$language['code']?>" src="<?=BASE_URL.'assets/images/flags/' . $language['code'] .'.jpg'?>"/>
            </a>
        </li>
        <?php endforeach; ?>
    </ul>
<?php endif; ?>